package org.javaboy.demo;

import org.javaboy.demo.model.User;
import org.springframework.beans.MutablePropertyValues;
import org.springframework.beans.PropertyValues;
import org.springframework.web.bind.WebDataBinder;

public class Demo {
    public static void main(String[] args) {
        User user = new User();
        WebDataBinder binder = new WebDataBinder(user);
        MutablePropertyValues pvs = new MutablePropertyValues();
        pvs.add("username", "lisi");
        pvs.add("address", 100);
        binder.bind(pvs);
        System.out.println("user = " + user);
    }
}
